package com.qzsoft.zhjd.machine.zhgcloud.fuel.model;

import java.math.BigDecimal;
import java.util.Date;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @ClassName ZhgFuelModel
 * @Description 实时油量
 * @author linhuawei
 * @since 2021-11-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
public class ZhgFuelModel {
    
    /**
     * 设备编号
     */
    private String machine_key;
    
    /**
     * 设备名称
     */
    private String machine_name;
    
    /**
     * 上报时间
     */
    private Date last_report_at;
    
    /**
     * 油位百分比
     */
    private BigDecimal percentage;
    
    /**
     * 油位数值
     */
    private BigDecimal volume;
    
    /**
     * @Title isValid
     * @Description 判断数据是否有效
     * @return treu|false
     */
    public boolean isValid() {
        return null != percentage || null != volume;
    }

}
